<#macro categoryTree parentId=''>
    <@_categoryList advanced=true parentId=parentId count=500>
        <#list page.list as a>
            <li>
                <a href="cmsContent/lookup_list.html?categoryId=${a.id}&field=${field!'relatedContentId'}" target="ajax" rel="content_list">${a.name!}</a>
            <#if a.childIds?has_content>
                <ul>
                    <@categoryTree a.id/>
                </ul>
            </#if>
            </li>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@_categoryList>
</#macro>
<div class="pageContent">
    <div class="unitBox" layoutH="0" style="float:left; display:block; overflow:auto; width:180px;background:#ffffff">
        <ul class="tree treeFolder">
            <li>
                <a href="cmsContent/lookup_list.html" target="ajax" rel="content_list"><@t.page 'category'/></a>
                <ul>
                    <@categoryTree/>
                </ul>
            </li>
         </ul>
    </div>
    <div id="content_list" class="unitBox" style="margin-left:180px;">
        <#include "lookup_list.html"/>
    </div>
    <div class="formBar">
        <ul>
            <li><button class="button" type="button" onclick="$.bringBack({'${field!'relatedContentId'}':'', url:'', title:'', description:''}); return false;"><@t.page 'button.clear_select'/></li>
            <li><button class="close button" type="button"><@t.page 'button.close'/></li>
        </ul>
    </div>
</div>